package client

type RespBase[T any] struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data T      `json:"data"`
}

func (r *RespBase[T]) ToError() error {
	return &ErrResp{Code: r.Code, Msg: r.Msg}
}
